package vg_connector.tests;

import vg_connector.implementation.ClientAPIService;
import vg_connector.implementation.ServerAPIService;
import vg_connector.interfaces.IClientAPIService;
import vg_connector.interfaces.IClientListener;
import vg_connector.interfaces.IServerAPIService;

import java.util.UUID;

/**
 * @author Timur Zolotuhin (e-mail: tzolotuhin@gmail.com)
 */
public class Client {
    public static void main(String[] args) {
        UUID instanceId = new UUID(0, 0);

        IClientAPIService clientAPIService = new ClientAPIService();
        clientAPIService.addClientListener(new IClientListener() {
            @Override
            public void connect() {
                System.out.println("Connect");
            }

            @Override
            public void disconnect() {
                System.out.println("Disconnect");
            }
        });

        try {
            clientAPIService.connect(instanceId);
        } catch (Throwable ex) {
            ex.printStackTrace();
        }

        while (true) {
            try {
                Thread.sleep(1000 * 10);
            } catch (Exception ex) {

            }
        }
    }
}
